<!--<div class="btn-group">
    <a href="<?php /*echo site_urlc('board/create')*/?>" class='btn btn-primary'> <i class="fa fa-plus"></i> <?php /*echo $title; */?> </a>
</div>-->

<?php
if(LOCALHOST) {
    $ref = isset($_GET['ref']) ? $_GET['ref'] : GLOBAL_URL.substr($_SERVER['PHP_SELF'],1).'?'.$_SERVER['QUERY_STRING'];
} else {
    $ref = isset($_GET['ref']) ? $_GET['ref'] : ADMINER_URL.'index.php'.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
}
include_once 'inc_ui_limit.php'; ?>

<p></p>
<form class="form-inline" action="<?php echo site_urlc($this->class.'/index/'.$this->cid); ?>" method="GET">
    <span>企业全称:</span>
    <input type="text" class="" name="name"
           value="<?php echo $this->input->get('name') ?>">
    <input class="btn" type="submit" value="检索">

</form>
<br/>
<?php echo form_open(site_urlc($this->class.'/import/'),array("class"=>"form-horizontal","id"=>"frm-create",'enctype'=>"multipart/form-data")); ?>
    <input type="file" name="file_excel" class="btn" value="导入">
    <input type="hidden" name="cid" value="<?php echo $this->cid ?>">
    <input type="hidden" name="ref" value="<?php echo $ref ?>">
    <div class="btn-group">
        <button type="submit" class="btn btn-primary"> <i class="fa fa-plus"></i> 导入 </button>
    </div>
<span>每次导入最大3000条</span>
</form>
<p></p>
<div class="boxed">
    <div class="boxed-inner seamless">

<table class="table table-striped table-hover select-list">
    <thead>
        <tr>
            <th class="width-small"><input id='selectbox-all' type="checkbox" > </th>
            <th>公司名称</th>
            <th>公司简称</th>
            <th>股票代码</th>
            <th>上传时间</th>
            <th class="span1">操作</th>
        </tr>
    </thead>
    <tbody class="sort-list">
        <?php foreach ($list as $v):?>
        <tr data-id="<?php echo $v['id'] ?>" data-sort="<?php echo $v['sort_id'] ?>">
            <td><input class="select-it" type="checkbox" value="<?php echo $v['id']; ?>" ></td>
            <td>
                <?php echo $v['name']?>
             </td>
            <td> <?php echo $v['short'] ?></td>
            <td> <?php echo  $v['stock_code']; ?></td>
            <td> <?php echo  date("Y/m/d H:i:s",$v['timeline']); ?> </td>
            <td>
                <div class="btn-group">
                    <a class='btn btn-small' href=" <?php echo site_urlc( $this->router->class.'/edit/'.$v['id']) ?> " title="<?php echo lang('edit') ?>"> <i class="fa fa-pencil"></i> <?php // echo lang('edit') ?></a>
                    <a class='btn btn-danger btn-small btn-del' data-id="<?php echo $v['id'] ?>" href="#"  title="<?php echo lang('del') ?>"> <i class="fa fa-times"></i> <?php // echo lang('del') ?></a>
                </div>
            </td>
        </tr>
        <?php endforeach;?>
    </tbody>
</table>

    </div>
</div>

<div class="btn-group">
    <a id='select-all' class='btn' href="#"> <i class=""></i> <?php echo lang('select_all') ?> </a>
    <a id='unselect-all' class='btn hide' href="#"> <i class=""></i> <?php echo lang('unselect') ?> </a>
    <a id="btn-del" class='btn btn-danger' href="#"> <i class="fa fa-times"></i> <?php echo lang('del') ?> </a>
</div>

<?php echo $pages; ?>

<script>
require(['jquery','adminer/js/ui'],function($,ui){
    var board = {
        url_del: "<?php echo site_urlc('board/delete'); ?>"
        ,url_audit: "<?php echo site_urlc('board/audit'); ?>"
        ,url_flag: "<?php echo site_urlc('board/flag'); ?>"
        ,url_sortid: "<?php echo site_urlc('board/sortid'); ?>"
    };

    ui.fancybox_img();
    ui.btn_delete(board.url_del);     // 删除
    ui.btn_audit(board.url_audit);    // 审核
    ui.btn_flag(board.url_flag);      // 推荐
    ui.sortable(board.url_sortid);    // 排序
    $('.import').click(function() {
        alert("123123");
    })
});
</script>
